package com.hushan.elevator.vo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class LogInfoVo {
    private Integer logId;


    private Integer businessType;

    private String logMessage;

    private String eventId;

    private String detail;

    private LocalDateTime createdTime;

    private String deviceSerial;

    private Integer deviceId;

    private String deviceName;

    public LogInfoVo(Object[] result) {
        this.logId = (Integer) result[0];
        this.businessType = (Integer) result[1];
        this.logMessage = (String) result[2];
        this.eventId = (String)result[3];
        this.detail = (String) result[4];
        this.createdTime = ((Timestamp) result[5]).toLocalDateTime();
        this.deviceSerial = (String) result[6];
        this.deviceId = (Integer) result[7];
        this.deviceName = (String)  result[8] ;
    }
}
